package com.atxiaodei.kabudashejimoshi.单例模式.register;



// 枚举式单例，不能被反射破坏，jdk底层做了处理，枚举不能被反射
public enum EnumSingleton {

    INSTANCE;

    private Object data;

    public Object getData() {

        return data;

    }

    public void setData(Object data) {
        this.data = data;
    }

    public static EnumSingleton getInstance(){

        return INSTANCE;
    }
}
